import { defineStore } from 'pinia'

const useMainStore = defineStore("main", {
    state: () => ({
        webInfo: {
            email: "",
            icpNumber: "",
            gaNumber: "",
            websiteName: "",
            name: "",
            captcha: false,
            allowUserPwd: false,
            expireTime: 60,
            domain: ""
        },
        weatherData: {

        }
    }),
    getters: {
        getWebInfo: state => state.webInfo,
        getWeatherData: state => state.weatherData
    },
    actions: {
        setWebInfo(info) {
            this.webInfo = info
        },
        setWeatherData(data) {
            this.weatherData = data
        }
    }
})

export default useMainStore